<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>农产品质量安全追溯系统</title>
<link rel="stylesheet" href="${path }/cms/css/public.css"/>
<link rel="stylesheet" href="${path }/cms/css/EnterpriseQuery.css">
<script type="text/javascript" src="${path }/cms/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<%@ include file="/WEB-INF/cms/header.jsp" %>

<div class="productInquire">
    <div>
        <img src="${path }/cms/images/cp1.png" alt="">
    </div>
    <div>
        <img src="${path }/cms/images/cp2.png" alt="">
    </div>
    <div>
        <input type="text" id="querycode" placeholder="请输入产品追溯码" value="${code }" />
        <p>商品条码，例：6901267867891</p>
        <img src="${path }/cms/images/cp5.png" alt="">
    </div>
    <div>
        <a href="javascript:;" onclick="doQuery()">
	        <div>点击查询</div>
	        <img src="${path }/cms/images/cp4.png" alt="点击查询" />
	    </a>
    </div>
</div>

<script type="text/javascript">
function doQuery(){
	location.href = '${path}/c/traceQuery.do?code='+$('#querycode').val();
}
</script>

<div class="iRTop">
    <h2>查询结果</h2>
    <div></div>
</div>

<div class="qycqBox">
    <div><img src="${traceData.company.imgurl }" alt="" onerror="this.src='${path }/cms/images/qy11.png'"></div>
    <div class="qycqConten">
        <div class="topHD"></div>
        <h3>${traceData.company.name }</h3>
        <p>类型：${traceData.company.type }</p>
        <p>编号：${traceData.company.code }</p>
        <p class="qycqPMB">生产规模：${traceData.company.productivity }</p>
        <p>联系人：${traceData.company.contact }</p>
        <p>电话：${traceData.company.phone }</p>
        <p>地址：${traceData.company.address }</p>
    </div>
</div>

<div class="xxMessage">
    <h3>详细信息</h3>
    <p>
        ${traceData.company.remark }
    </p>
</div>

<div class="cardMessageBox">
    <div>
        <div class="slideBlock">营业执照编号：${traceData.company.business }</div>
        <p class="contentP">
            营业执照编号：${traceData.company.business }
        </p>
    </div>

    <div>
        <div class="slideBlock">法人代表：${traceData.company.corporate }</div>
        <p class="contentP">
            法人代表：${traceData.company.corporate }
        </p>
    </div>
    <div>
        <div class="slideBlock">企业级别：${traceData.company.level }</div>
        <p class="contentP">
            企业级别：${traceData.company.level }
        </p>
    </div>
    <div>
        <div class="slideBlock">${traceData.company.farmLevel }农业标准化示范基地</div>
        <p class="contentP">
           ${traceData.company.farmLevel }农业标准化示范基地
        </p>
    </div>
    <div>
        <div class="slideBlock">生产规模：${traceData.company.productivity }</div>
        <p class="contentP">
            生产规模：${traceData.company.productivity }
        </p>
    </div>
    <div>
        <div class="slideBlock">${traceData.company.ccc }</div>
        <p class="contentP">
            ${traceData.company.ccc }
        </p>
    </div>
</div>


<div class="connectUsMapBox" id="allmap">
</div>

<%@ include file="/WEB-INF/cms/footer.jsp" %>

<script type="text/javascript" src="https://map.qq.com/api/js?v=2.exp&key=QVPBZ-QJO6X-2S24Q-TVPQO-CRYC2-JMBL2" charset="utf-8"></script>
<script type="text/javascript">
var lng = '${traceData.company.lng}',lat = '${traceData.company.lat}';
$(function(){
	if(lng && lat){
		var map = new qq.maps.Map("allmap", {
	        center: new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)),
	        zoom: 15,
	        draggable: false,
	        scrollwheel: false,
	        disableDoubleClickZoom: true,
	        panControl:false,
	        zoomControl: false
	    });
		map.panTo(new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)));
		var marker = new qq.maps.Marker({position: new qq.maps.LatLng(parseFloat(lat), parseFloat(lng)), map: map});
		map.setDraggable(false);
	}
});
</script>

</body>
</html>